package com.ryder.ryderschool.entity;

import com.baomidou.mybatisplus.annotation.*;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@TableName("project_results")
public class ProjectResult {
    @TableId(type = IdType.AUTO)
    private Integer id;
    
    @NotNull(message = "项目ID不能为空")
    private Integer projectId;
    
    @NotBlank(message = "成果类型不能为空")
    private String type;
    
    @NotBlank(message = "成果标题不能为空")
    private String title;
    
    @NotNull(message = "发布日期不能为空")
    private LocalDate publishedDate;
    
    private String url;
    
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
    
    @TableLogic
    private Integer deleted;
} 